package com.ss.SmartStock.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ss.SmartStock.pojo.entity.Operation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author author
 * @since 2024-06-20
 */
@Mapper
public interface OperationRecordsMapper extends BaseMapper<Operation> {

    @Insert("insert into operation_records(p_details_id,status,remarks,operation_time,operator_id) values(#{pDetailsId},#{status},#{remarks},#{operationTime},#{operatorId})")
    int insertOperation(Operation operation);
    @Select("SELECT * FROM operation_records")
    IPage<Operation> selectPageOperations(Page<Operation> page);
}
